package kr.hkit.info.powerjava.ch23;

class JoinThread extends Thread{
	public void run(){
		for(int i=0; i<10;i++){
			try{ Thread.sleep(1000);} catch(Exception e){}
			System.out.println(i);
		}
	}
}


public class JoinTest {
	public static void main(String[] args) {
		JoinThread jt = new JoinThread();
		jt.start();
		
		
		
		for(char ch='a' ; ch<='z';ch++){
			try{ Thread.sleep(500);} catch(Exception e){}
			System.out.println(ch);
		}
		
		try {
			jt.join();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
